<ion-header>

  <ion-navbar>
    <ion-buttons left>
      <button ion-button icon-only (click)="dismiss()">
        <ion-icon name="ios-arrow-back"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>完工</ion-title>
  </ion-navbar>

</ion-header>

<ion-content>
  <ng-container *ngFor="let SP of codeList; let i = index">
    <div class="w12 pl10 pt10 pb10 font_gray">{{SP.EXTSKUNAME}}</div>
    <ng-container *ngFor="let v of SP.codes">
      <div class="w12 bgcolor_white">
        <ng-container *ngIf="v.lx=='1'">
          <div class="jl_input">
            <div class="jl_input_item bor_bottom">
              <span class="w04">外机编号</span>
              <input placeholder="" [(ngModel)]="v.code" (keydown)="shuRus($event,SP,i)" (blur)="sJs(v,SP,i)">
              <i class="fa fa-camera" (click)="scanWJBM(v,SP,i)"></i>
            </div>
          </div>
        </ng-container>
        <ng-container *ngIf="v.lx=='2'">
          <div class="jl_input">
            <div class="jl_input_item bor_bottom">
              <span class="w04">内机编号</span>
              <ng-container *ngIf="addCode">
                <input placeholder="必填" [(ngModel)]="v.code" (keydown)="shuRus($event,SP,i)" (blur)="sJs(v,SP,i)">
              </ng-container>
              <ng-container *ngIf="!addCode">
                <input placeholder=" " [(ngModel)]="v.code" (keydown)="shuRus($event,SP,i)" (blur)="sJs(v,SP,i)">
              </ng-container>
              <i class="fa fa-camera" (click)="scanNJBM(v,SP,i)"></i>
            </div>
          </div>
        </ng-container>
        <ng-container *ngIf="v.lx=='3'">
          <div class="jl_input">
            <div class="jl_input_item bor_bottom">
              <span class="w04">条码</span>
              <input placeholder=""  [(ngModel)]="v.code" (keydown)="shuRus($event,SP,i)" (blur)="sJs(v,SP,i)">
              <i class="fa fa-camera" (click)="scanNJBM(v,SP,i)"></i>
            </div>
          </div>
        </ng-container>
      </div>
    </ng-container>
  </ng-container>

  <div class="w12 bgcolor_white item pl15 pr15 pt10 pb10 mb10">
    <!--<select-pic *ngIf="!isApp" [max]="picMaxLength" [(fileObjList)]="picList"
                (addEvent)="imageUpload($event)"
                (deleteEvent)="delImage($event)"></select-pic>
    <select-pic-native *ngIf="isApp" [max]="picMaxLength" [(fileObjList)]="picList"
                       [mode]="'all'" (addImage)="imageUpload($event)"
                       (delImage)="delImage($event)"></select-pic-native>-->
    <image-picker class="fl up_img" [mode]="'all'"
                  [(ngModel)]="picList"
                  [upload]="true"
                  [isFileServer]="true"
                  (addEvent)="imageUpload($event)"
                  (delEvent)="delImage($event)"></image-picker>
  </div>

  <div class="w12 pl10 pt10 pb10 font_gray">备注</div>
  <div class="w12 bgcolor_white">
    <div class="jl_input">
      <label class="jl_input_item pr15">
        <textarea class="w12 font_size_large" [(ngModel)]="remarks"></textarea>
      </label>
    </div>
  </div>

  <div class="w12 pl10 pt10 pb10 font_gray">楼层</div>
  <div class="w12 bgcolor_white">
    <div class="jl_input">
      <div class="jl_input_item pr15">
        <ion-input type="number" placeholder="楼层请填写阿拉伯数字！" [(ngModel)]="foolernum" value="{{foolernum}}"></ion-input>
      </div>
    </div>
  </div>

  <div class="w12 mt15 bgcolor_white">
    <div class="jl_form">
      <div class="jl_form_item bor_bottom pr10">
        <span class="w04 lh30">{{ '是否有电梯' }}</span>
        <label class="w08 tr">
          <ion-toggle class="fr" mode="ios" [(ngModel)]="isLift"></ion-toggle>
        </label>
      </div>
    </div>
  </div>

  <!--<div class="w12 pl10 pt10 pb10 font_gray">是否有电梯</div>-->
  <!--<div class="w12 bgcolor_white">-->
    <!--<div class="jl_input">-->
      <!--<div class="jl_input_item pr15">-->
        <!--<textarea class="w12 font_size_large" [(ngModel)]="isLift" mode="ios"></textarea>-->
      <!--</div>-->
    <!--</div>-->
  <!--</div>-->

  <div class="w12 mt15 bgcolor_white">
    <div class="jl_form">
      <div class="jl_form_item bor_bottom pr10">
        <span class="w04 lh30">{{ '配送失败' }}</span>
        <label class="w08 tr">
          <ion-toggle class="fr" mode="ios" [(ngModel)]="isFailureOfDistribution"
                      (ngModelChange)="FanCang()"></ion-toggle>
        </label>
      </div>
    </div>
  </div>

  <div class="jl_form" [class.hide]="!isFailureOfDistribution">
    <div class="jl_form_item">
      <span class="w04">原因</span>
      <span class="w08 tr">{{PSSBYY ? PSSBYY : '请选择'}}</span>
      <i class="fa fa-angle-right"></i>
    </div>
  </div>

</ion-content>

<ion-footer>
  <div class="address_footer">
    <button class="w12 add_ljgm_btn" ion-button (click)="submit()">提交</button>
  </div>
</ion-footer>


